//
//  DidiBaseViewController.m
//  didihaha
//
//  Created by 赵忠鹏 on 2017/8/3.
//  Copyright © 2017年 zhaozhongpeng. All rights reserved.
//

#import "DidiBaseViewController.h"

@interface DidiBaseViewController ()

@end

@implementation DidiBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}


- (void)setLeftBackButton{
    
    UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"common_titlebar_back_normal"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(backPop)];
    self.navigationItem.leftBarButtonItem = back;
}

- (void)backPop{
    [self.navigationController popViewControllerAnimated:YES];
    [self dismissViewControllerAnimated:YES completion:nil];
}


- (void)setTile:(NSString *)String{
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 83, 17)];
    titleLabel.text = String;
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.font = [UIFont systemFontOfSize:16];
    titleLabel.textColor = [UIColor colorWithRed:38/255.0 green:38/255.0 blue:38/255.0 alpha:1];
    self.navigationItem.titleView = titleLabel;
}


@end
